﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SetSailView
{
    public static class MessShow
    {
        /// <summary>
        /// 显示信息
        /// </summary>
        /// <param name="content">显示内容</param>
        /// <returns></returns>
        public static void ShowSure(string content)
        {
            ShowInfo si = new ShowInfo(content, TipState.sure);
            //si.MdiParent = SetSailView.Frm_Login
            si.ShowDialog();
        }

        /// <summary>
        /// 显示信息
        /// </summary>
        /// <param name="content">显示内容</param>
        /// <param name="symbol">是否显示符号</param>
        /// <returns></returns>
        public static void ShowSure(string content, bool symbol)
        {
            ShowInfo si = new ShowInfo(content, TipState.sure, symbol);
            si.ShowDialog();
        }

        /// <summary>
        /// 显示信息
        /// </summary>
        /// <param name="content">显示内容</param>
        /// <param name="title">显示标题</param>
        /// <returns></returns>
        public static void ShowSure(string content, string title)
        {
            ShowInfo si = new ShowInfo(content, TipState.sure, true, title);
            si.ShowDialog();
        }

        /// <summary>
        /// 显示信息
        /// </summary>
        /// <param name="content">显示内容</param>
        /// <param name="symbol">是否显示符号</param>
        /// <param name="title">显示标题</param>
        /// <returns></returns>
        public static void ShowSure(string content, bool symbol, string title)
        {
            ShowInfo si = new ShowInfo(content, TipState.sure, symbol, title);
            si.ShowDialog();
        }

        /// <summary>
        /// 提示信息
        /// </summary>
        /// <param name="content">显示内容</param>
        /// <returns></returns>
        public static void ShowHint(string content)
        {
            ShowInfo si = new ShowInfo(content, TipState.hint);
            si.ShowDialog();
        }

        /// <summary>
        /// 提示信息
        /// </summary>
        /// <param name="content">显示内容</param>
        /// <param name="symbol">是否显示符号</param>
        /// <returns></returns>
        public static void ShowHint(string content, bool symbol)
        {
            ShowInfo si = new ShowInfo(content, TipState.hint, symbol);
            si.ShowDialog();
        }

        /// <summary>
        /// 提示信息
        /// </summary>
        /// <param name="content">显示内容</param>
        /// <param name="title">显示标题</param>
        /// <returns></returns>
        public static void ShowHint(string content, string title)
        {
            ShowInfo si = new ShowInfo(content, TipState.hint, true, title);
            si.ShowDialog();
        }

        /// <summary>
        /// 提示信息
        /// </summary>
        /// <param name="content">显示内容</param>
        /// <param name="symbol">是否显示符号</param>
        /// <param name="title">显示标题</param>
        /// <returns></returns>
        public static void ShowHint(string content, bool symbol, string title)
        {
            ShowInfo si = new ShowInfo(content, TipState.hint, symbol, title);
            si.ShowDialog();
        }

        /// <summary>
        /// 确认信息
        /// </summary>
        /// <param name="content">显示内容</param>
        /// <returns></returns>
        public static DialogResult ShowQuery(string content)
        {
            ShowInfo si = new ShowInfo(content, TipState.query);
            return si.ShowDialog();
        }

        /// <summary>
        /// 确认信息
        /// </summary>
        /// <param name="content">显示内容</param>
        /// <param name="symbol">是否显示符号</param>
        /// <returns></returns>
        public static DialogResult ShowQuery(string content, bool symbol)
        {
            ShowInfo si = new ShowInfo(content, TipState.query, symbol);
            return si.ShowDialog();
        }

        /// <summary>
        /// 确认信息
        /// </summary>
        /// <param name="content">显示内容</param>
        /// <param name="title">显示标题</param>
        /// <returns></returns>
        public static DialogResult ShowQuery(string content, string title)
        {
            ShowInfo si = new ShowInfo(content, TipState.query, true, title);
            return si.ShowDialog();
        }

        /// <summary>
        /// 确认信息
        /// </summary>
        /// <param name="content">显示内容</param>
        /// <param name="symbol">是否显示符号</param>
        /// <param name="title">显示标题</param>
        /// <returns></returns>
        public static DialogResult ShowQuery(string content, bool symbol, string title)
        {
            ShowInfo si = new ShowInfo(content, TipState.query, symbol, title);
            return si.ShowDialog();
        }

        /// <summary>
        /// 错误信息
        /// </summary>
        /// <param name="content">显示内容</param>
        /// <returns></returns>
        public static void ShowMistake(string content)
        {
            ShowInfo si = new ShowInfo(content, TipState.mistake);
            si.ShowDialog();
        }

        /// <summary>
        /// 错误信息
        /// </summary>
        /// <param name="content">显示内容</param>
        /// <param name="symbol">是否显示符号</param>
        /// <returns></returns>
        public static void ShowMistake(string content, bool symbol)
        {
            ShowInfo si = new ShowInfo(content, TipState.mistake, symbol);
            si.ShowDialog();
        }

        /// <summary>
        /// 错误信息
        /// </summary>
        /// <param name="content">显示内容</param>
        /// <param name="title">显示标题</param>
        /// <returns></returns>
        public static void ShowMistake(string content, string title)
        {
            ShowInfo si = new ShowInfo(content, TipState.mistake, true, title);
            si.ShowDialog();
        }

        /// <summary>
        /// 错误信息
        /// </summary>
        /// <param name="content">显示内容</param>
        /// <param name="symbol">是否显示符号</param>
        /// <param name="title">显示标题</param>
        /// <returns></returns>
        public static void ShowMistake(string content, bool symbol, string title)
        {
            ShowInfo si = new ShowInfo(content, TipState.mistake, symbol, title);
            si.ShowDialog();
        }
    }

    /// <summary>
    /// 图标状态
    /// </summary>
    public enum TipState
    {
        sure,//确定
        hint,//提示
        query,//询问
        mistake//错误
    }
}
